{template common/header}
{template user/userheader}
<div class="container mt20">
	<div class="span12 main">
		{template user/usernav}
		<div class="messages">
			<h4 class="mt10 text_c">
			{lang my_message}
			</h4>
              <ul class="ms_list">
              	{loop $messages $message}
              	<li> 
              		{if $message['to_user_id']==$cuser['uid']}
					<a href="javascript:void(0);">
						<img src="{avatar($message['from_user_id'], 'middle')}" class="avatar photo-middle" style="margin-top: 5px;">
					</a>
			    	<p>
						<span><a href="{url home/user?uid=$message['from_user_id']}">{$message['fnickname']}</a> {lang say_to_you}:</span>
					</p>
					{else}
					<a href="javascript:void(0);">
						<img src="{avatar($message['to_user_id'], 'middle')?>" class="avatar photo-middle" style="margin-top: 5px;">
					</a>
			    	<p>
						<span>{lang you_say_to} <a href="{url home/user?uid=$message['to_user_id']}">{$message['tnickname']}</a> {lang say}:</span>
					</p>
					{/if}
					<p>
						{$message['message_txt']}
					</p>
					<p>
						<em class="time">{date $message['create_time']}</em>
					</p>
				</li>
				{/loop}
              </ul>
              <div class="pull-right">{$pages}</div>
       </div>
	</div>
</div>
{template common/footer}
